function initVideo () {
    var player = new Aliplayer({
        "id": "player-con",
        "source": "https://player.alicdn.com/video/aliyunmedia.mp4",
        "width": "100%",
        "height": "500px",
        "autoplay": false,
        "isLive": false,
        "rePlay": false,
        "playsinline": true,
        "preload": true,
        "controlBarVisibility": "hover",
        "useH5Prism": true
    }, function (player) {
        console.log("The player is created");
        }
    )
    var player = $("#player-con")
    var height = player.height()
    var offset = player.offset()
    offset.bottom = offset.top+height
    console.log(offset)
    $(document).on('scroll',function(options) {
        let scrollTop = $(document).scrollTop()
        if(scrollTop>offset.bottom){
            player.addClass('fixed')
            player.css({
                width: "420px",
                height: "200px"
            })
        }else{
            player.removeClass('fixed')
            player.css({
                width: "100%",
                height: "500px"
            })
        }
    })
    // 
}
$(function(){
    hljs.configure({
        languages: ['javascript', 'java', 'python', 'css', 'html']
    });
    document.querySelectorAll('pre').forEach((block) => {
        console.log('block', block)
        hljs.highlightBlock(block);
    })

    $('div.btn_open_more_wrap').click(function(){
        window.open('./pay.html'); 
        $.get('./tutorialContent/content.html', (data)=>{
            $(this).after(data);
            $(this).remove()
            initVideo()
        },'html')
    })
})